import Vue from 'vue'
import { URL_PREFIX } from '@/api/index'

/* /system/classify/themes
查询主题分类列表 */
export const getSystemThemeList = () => Vue.http.get(URL_PREFIX + '/system/classify/themes')

/* /system/classify/fields
查询领域分类列表 */
export const getFieldsList = () => Vue.http.get(URL_PREFIX + '/system/classify/fields')

/* /system/classify/products
查询产品分类列表 */
export const getProductList = () => Vue.http.get(URL_PREFIX + '/system/classify/products')

/* /system/classify
query: { name: '', type: '' }
增加分类 */
export const classifyAdd = (params) => Vue.http.post(URL_PREFIX + '/system/classify', null, { params })

/* /system/classify/update/name/{id}
修改分类 */
export const classifyUpdate = (id, params) =>
  Vue.http.post(URL_PREFIX + '/system/classify/update/name/' + id, null, { params })

/* /system/classify/update/order/{id}
query: { order: [number] }
修改分类排序 */
export const classifyOrderUpdate = (id, params) =>
  Vue.http.post(URL_PREFIX + '/system/classify/update/order/' + id, null, { params })

/* /system/classify/remove/{id}
删除分类 */
export const classifyRemove = (id) => Vue.http.post(URL_PREFIX + '/system/classify/remove/' + id)

/* /system/organ/list
机构选择列表 */
export const getOrganList = () => Vue.http.get(URL_PREFIX + '/system/organ/list')
